Skip to content

Add community Windows GUI configurator - #76

Open
Rezetyan wants to merge 1 commit into
petoncle:mainfrom
Rezetyan:add-windows-configurator
Open

Add community Windows GUI configurator#76
Rezetyan wants to merge 1 commit into
petoncle:mainfrom
Rezetyan:add-windows-configurator

Conversation

@Rezetyan

Copy link
Copy Markdown

Summary

This PR contributes a community-maintained Windows GUI configurator for MouseMaster
properties files, developed in the Rezetyan/mousemaster
fork and already released there (most recently as
configurator v2.1.0).

Everything lives in a self-contained configurator/ directory: C# WinForms source, the
build script, an English README (中文说明), an MIT license
for the new code, and two layers of tests. There are no changes to any existing
MouseMaster file
beyond a short README section and .gitignore entries for the build
artifacts.

What it does

  • Bilingual UI (Simplified Chinese / English) following the Windows display language,
    switchable at runtime; the choice is remembered in the registry.
  • Rebinds 37 actions in six categories (activation, movement, mouse buttons, wheel,
    mode switches, hints, automation) plus four motion values (mouse/wheel max velocity
    and acceleration). Only the default branch of the dynamic velocity properties is
    replaced; modifier branches and initial velocities are preserved.
  • Exact-chord conflict resolution: rebinding to an already-used shortcut in the same
    mode scope clears the old binding and reports the change.
  • Careful combo generation: normal-mode entry combos are generated with mutual
    same-key modifier exclusion (^{...}), so a modifier-free binding can never shadow a
    modified one (e.g. Screen Hint Ctrl+F vs UI Hint F generate _{leftctrl} +f and
    ^{leftctrl} +f instead of both firing on Ctrl+F).
  • Optional focus mode: generates per-mode swallow-all fallback aliases for the eight
    keyboard-mouse modes, excluding keys used by each mode's existing non-swallowing
    combos, and comments out OS-bound macros while it is on.
  • Alt-Tab auto-centering can be toggled and its trigger chord edited.
  • Lossless editing: properties and comments it does not manage are preserved
    verbatim (including anything newer versions add), GUI state round-trips through a
    comment-based mmcfg metadata block, a rolling .gui-backup is written before every
    save, and the build-time embedded neo-mousekeys-ijkl default can be restored.

Engineering notes

  • No dependencies: builds with the stock .NET Framework 4.x csc.exe via
    configurator/build.ps1; no NuGet packages, no project files, no build system.
    configuration/neo-mousekeys-ijkl.properties is embedded as the restore-default
    resource.
  • DPI correct: PerMonitorV2 via the app manifest, all layout metrics designed for
    96 DPI and scaled to the current monitor, with WM_DPICHANGED relayout.
  • Tested without a test framework: MouseMasterConfigurator.exe --self-test runs
    305 assertions headlessly (catalog coverage, chord parsing, conflict behavior,
    metadata round-trip, focus aliases, atomic restore, and a bilingual layout/text-fit
    pass over every fixed-size label). configurator/tests/FocusModeIntegrationTest.cs
    drives a real mousemaster.exe with injected keyboard events against a real
    foreground window (six checks: pass-through in idle, mode entry, pass-through exit,
    input swallowing, shortcut swallowing, clean restore).

Verification

  • configurator/build.ps1 compiles cleanly and --self-test reports
    PASS: 305 assertions against this branch (i.e. with the current
    configuration/neo-mousekeys-ijkl.properties from main, which has evolved since
    v89 — the configurator's preserving parser handles the newer properties fine).
  • On the fork, the same suite plus the focus-mode integration test (6 × OK + PASS)
    was run against the real upstream v89 mousemaster.exe, whose SHA-256 is verified
    against the upstream release in CI.

Out of scope (can follow if wanted)

The fork also has tag-triggered release automation
(.github/workflows/configurator-release.yml) that builds the configurator, runs the
self-test, verifies the upstream mousemaster.exe SHA-256, and publishes a bundle
(configurator + mousemaster + sample configs + SHA256SUMS.txt). It is intentionally
not part of this PR since release policy is the maintainer's call; happy to
contribute it separately if you are interested.

🤖 Generated with Claude Code

Self-contained WinForms configurator for MouseMaster properties files,
developed in the Rezetyan/mousemaster fork and released there as
configurator v2.1.0. Targets the v89 properties format and preserves
any properties and comments it does not manage.

- Bilingual Simplified Chinese / English UI following the Windows
  display language, switchable at runtime.
- Rebinds 37 actions in six categories plus four mouse/wheel motion
  values, with exact-chord conflict resolution and reporting.
- Normal-mode entry combos are generated with mutual same-key modifier
  exclusion (^{...}) so a modifier-free binding never shadows a
  modified one.
- Optional focus mode generates per-mode swallow-all fallback aliases
  for the eight keyboard-mouse modes; Alt-Tab centering is toggled
  independently.
- Lossless round-trip via comment-based mmcfg metadata, rolling
  .gui-backup before every save, and restore of the build-time embedded
  neo-mousekeys-ijkl default.
- Builds with the stock .NET Framework csc.exe (no NuGet packages);
  PerMonitorV2 DPI-aware layout that rescales across monitors.
- 305-assertion headless self-test (--self-test) plus an end-to-end
  focus-mode test that injects keys into a real foreground window
  driven by a real mousemaster.exe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant